<template>
	<!-- 销售单财务审核 货款信息 -->
	<uni-card
	  v-if="dataOne?.activitiInstance?.formKey === 'deduct' && 
	  (billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS' || billType ==='FLXS')"
	  :title="'货款信息'"
	  class="card"
	>
	 <text class="card-item">
		<text class="title">客户名称</text>：{{ dataOne['subAccountInfo']?.['merchantName'] }}
	 </text>
	 <text class="card-item">
	 	<text class="title">账户类型</text>：{{ dataOne['subAccountInfo']?.['financialAccountTypeName'] }}
	 </text>
	 <text class="card-item">
	 	<text class="title">客户余额(元)</text>：{{ dataOne['subAccountInfo']?.['deposit'] }}
	 </text>
	 <text class="card-item">
	 	<text class="title">信用额度(元)</text>：{{ dataOne['subAccountInfo']?.['credit'] }}
	 </text>
	 
	 <!-- 主料销售单 -->
	 <text class="card-item" 
		   v-if="billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS'">
	 	<text class="title">应收金额(元)</text>：{{ dataOne.productAmt }}
	 </text>
	 <view class="uni-form-item uni-column" style="margin-top: 10px;"
	       v-if="billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS'">
	 	<view class="title">实收金额(元)</view>
	 	<input class="uni-input" type="digit" v-model="paidProductAmt" @input="inputPaidProductAmt"  placeholder-style="color:#F76260" placeholder="请输入金额" />
	 </view> 
	 
	 <!-- 废料处理 -->
	 <text class="card-item" v-if="billType ==='FLXS'">
	 	<text class="title">应收金额(元)</text>：{{ dataOne.wasteAmt }}
	 </text>
	 <view class="uni-form-item uni-column" v-if="billType ==='FLXS'" style="margin-top: 10px;">
	 	<view class="title">实收金额(元)</view>
	 	<input class="uni-input" type="digit" v-model="paidWasteAmt" @input="inputPaidWasteAmt"  placeholder-style="color:#F76260" placeholder="请输入金额" />
	 </view> 
	 
	</uni-card>
	
	<!-- 销售单财务审核 其他费用信息 -->
	<uni-card
	  v-if="dataOne?.activitiInstance?.formKey === 'deduct' &&
	  (billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS' || billType ==='FLXS')"
	  :title="'其他费用信息'"
	  class="card"
	>
	 <text class="card-item">
		<text class="title">客户名称</text>：{{ dataOne['subAccountInfo']?.['privateMerchantName'] }}
	 </text>
	 <text class="card-item">
	 	<text class="title">账户类型</text>：{{ dataOne['subAccountInfo']?.['privateFinancialAccountTypeName'] }}
	 </text>
	 <text class="card-item">
	 	<text class="title">客户余额(元)</text>：{{ dataOne['subAccountInfo']?.['privateDeposit'] }}
	 </text>
	 <text class="card-item">
	 	<text class="title">信用额度(元)</text>：{{ dataOne['subAccountInfo']?.['privateCredit'] }}
	 </text>
	 
	 <!-- 主料销售单 -->
	 <text class="card-item" v-if="billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS'">
	 	<text class="title">运费应收金额(元)</text>：{{ dataOne.freightAmt }}
	 </text>
	 <text class="card-item" v-if="billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS'">
	 	<text class="title">其他金额应收(元)</text>：{{ dataOne.totalOtherAmount }}
	 </text>
	 <text class="card-item" v-if="billType ==='ZYXS'" >
	 	<text class="title">铁桶押金(元)</text>：{{ dataOne.ironBarrelDeposit }}
	 </text>
	 <view class="uni-form-item uni-column" v-if="billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS'" style="margin-top: 10px;">
	 	<view class="title">运费金额实收(元)</view>
	 	<input class="uni-input" type="digit" v-model="paidFreightAmt"  @input="inputPaidFreightAmt" placeholder-style="color:#F76260" placeholder="请输入金额" />
	 </view>
	 <view class="uni-form-item uni-column" v-if="billType ==='RZXS' || billType ==='SXXS' || billType ==='ZYXS' || billType ==='DXXS'" style="margin-top: 10px;">
	 	<view class="title">其他金额实收(元)</view>
	 	<input class="uni-input" type="digit" v-model="paidOtherAmt"  @input="inputPaidOtherAmt" placeholder-style="color:#F76260" placeholder="请输入金额" />
	 </view>
	 
	 <!-- 废料处理 -->
	 <text class="card-item" v-if="billType ==='FLXS'" >
	 	<text class="title">其他金额(元)</text>：{{ dataOne.extraExpenseAmt }}
	 </text>
	 <view class="uni-form-item uni-column" v-if="billType ==='FLXS'" style="margin-top: 10px;">
	 	<view class="title">实收金额(元)</view>
	 	<input class="uni-input" type="digit" v-model="paidOtherAmt" @input="inputPaidOtherAmt"  placeholder-style="color:#F76260" placeholder="请输入金额" />
	 </view> 
	 
	</uni-card>
</template>

<script>
	import {
		range
	} from './api';
	export default {
		props: {
			billType: String,
			dataOne: Object,
		},
		data() {
			return {
				range,
				paidProductAmt: "",
				paidWasteAmt: "",
				paidFreightAmt: "",
				paidOtherAmt: "",
			};
		},

		methods: {
			inputPaidProductAmt(v) {
				this.$emit('formValueChange', {
					paidProductAmt: v?.detail?.value,
				})
			},
			inputPaidWasteAmt(v) {
				this.$emit('formValueChange', {
					paidWasteAmt: v?.detail?.value,
				})
			},
			inputPaidFreightAmt(v) {
				this.$emit('formValueChange', {
					paidFreightAmt: v?.detail?.value,
				})
			},
			inputPaidOtherAmt(v) {
				this.$emit('formValueChange', {
					paidOtherAmt: v?.detail?.value
				})
			},
		},
	};
</script>

<style lang="scss" scoped>



</style>
